package com.awise.app.timer.activity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by lihaifeng on 2018/1/23.
 */

public class FrameData implements Parcelable{
    private byte[] time;
    private byte[] brightnesses;
    private byte effect;

    public FrameData() {

    }

    protected FrameData(Parcel in) {
        time = in.createByteArray();
        brightnesses = in.createByteArray();
        effect = in.readByte();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByteArray(time);
        dest.writeByteArray(brightnesses);
        dest.writeByte(effect);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<FrameData> CREATOR = new Creator<FrameData>() {
        @Override
        public FrameData createFromParcel(Parcel in) {
            return new FrameData(in);
        }

        @Override
        public FrameData[] newArray(int size) {
            return new FrameData[size];
        }
    };

    public byte[] getTime() {
        return time;
    }

    public void setTime(byte[] time) {
        this.time = time;
    }

    public byte[] getBrightnesses() {
        return brightnesses;
    }

    public void setBrightnesses(byte[] brightnesses) {
        this.brightnesses = brightnesses;
    }

    public byte getEffect() {
        return effect;
    }

    public void setEffect(byte effect) {
        this.effect = effect;
    }
}
